<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>中国酒业兄弟连视频</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <!--weui.min.css-->
    <link rel="stylesheet" type="text/css" href="__STATIC__/zb/css/weui.min.css">
    <!--jquery-weui.min.css-->
    <link rel="stylesheet" type="text/css" href="__STATIC__/zb/css/jquery-weui.min.css">
    <link rel="stylesheet" href="__STATIC__/zb/css/base.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/zb/css/font.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/zb/css/index.css"/>
</head>
<body>
<div class="pageControl">
	<!--注释-->
    <div>
        <img src="__STATIC__/zb/img/j1.png" alt="">
    </div>
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <span>中国酒业兄弟连视频</span>
        </div>
    </div>
    <div>
        {volist name="info" id="vo"}
        <a href="{:url('detail')}?video_id={$vo.id}" class="weui-cell video noBorder">
            <div class="weui-cell__hd">
                <img src="{$vo.image}" alt="">
                <span class="cl-f">{$vo.duration}</span>
            </div>
            <div class="weui-cell__bd pl">
                <p class="title">{$vo.name}</p>
                <p class="cl-9999"><span>{$vo.play_count}</span>次播放</p>
            </div>
        </a>
        {/volist}
    </div>

</div>
<script type="text/javascript" src="__STATIC__/zb/js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="__STATIC__/zb/js/jquery-weui.min.js"></script>
{notempty name="signPackage"}
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    wx.config({
            //debug: true,
            appId: '{$signPackage.appId}',
            timestamp: {$signPackage.timestamp},
        nonceStr:'{$signPackage.nonceStr}',
        signature: '{$signPackage.signature}',
        jsApiList: [
        // 所有要调用的 API 都要加到这个列表中
        'checkJsApi',
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'hideMenuItems'
    ]
    });
    wx.ready(function () {
        // 在这里调用 API
        wx.checkJsApi({
            jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'hideMenuItems'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
            success: function(res) {
//                alert(res.checkResult.onMenuShareTimeline);
//                alert(res.errMsg);
                //console.log(res);
                // 以键值对的形式返回，可用的api值true，不可用为false
                // 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
            }
        });

        wx.onMenuShareTimeline({
            title: '中国酒业兄弟连视频', // 分享标题
            desc : '为中国酒业兄弟连加油，一起努力!',
            link: window.location.href, // 分享链接
            imgUrl: 'http://'+window.location.host+'__STATIC__/zb/img/xdl.jpg', // 分享图标
            success: function () {
                alert('成功');
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                alert('取消');
                // 用户取消分享后执行的回调函数
            }
        });

        wx.onMenuShareAppMessage({
            title: '中国酒业兄弟连视频', // 分享标题
            desc : '为中国酒业兄弟连加油，一起努力!',
            link: window.location.href, // 分享链接
            imgUrl: 'http://'+window.location.host+'__STATIC__/zb/img/xdl.jpg', // 分享图标
            type: '', // 分享类型,music、video或link，不填默认为link
            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
            success: function () {
                alert('成功');
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                alert('取消');
                // 用户取消分享后执行的回调函数
            }
        });
        wx.hideMenuItems({
            menuList: ['menuItem:share:qq', 'menuItem:share:weiboApp', 'menuItem:favorite', 'menuItem:share:QZone', "menuItem:copyUrl", 'menuItem:openWithQQBrowser', 'menuItem:share:email', 'menuItem:openWithSafari'] // 要显示的菜单项，所有menu项见附录3
        });
    });
</script>
{/notempty}
</body>
</html>

